<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<title>Winamp like snapping</title>
	
			<script type="text/javascript" src="../../../jquery-1.2.6.js"></script>
			<script type="text/javascript" src="../../../ui/ui.core.js"></script>
			<script type="text/javascript" src="../../../ui/ui.draggable.js"></script>

			<style type="text/css" media="screen">
				.panel {
					background: #999;
					width: 200px;
					height: 80px;
					position: absolute;
					top: 0px;
					left: 0px;
				}
			</style>
			
			<script type="text/javascript">
				
				$(document).ready(function() {
					
					$("div").draggable({
						snap: {
							snap: function(e, ui) {
								console.log("Snap ", ui.snapItem);
							},
							release: function(e, ui) {
								console.log("Release ", ui.snapItem);
							}
						}
					});
					
				});
			
			</script>

	</head>
	<body>
		
		<div class="panel" id="base">Base panel</div>
		<div class="panel"></div>
		<div class="panel"></div>
		
	</body>
</html>